From: Ewan Mellor Date: Sun, 25 Mar 2007 21:17:30 +0000 (+0100) Subject: Added C bindings and docs for recent addition VM.set_VCPUs_number_live. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15277^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=231f7bf638ac8c7349000f942065b2bb6eadaa3d;p=xen.git Added C bindings and docs for recent addition VM.set_VCPUs_number_live. Signed-off-by: Ewan Mellor --- diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index e5d2c18400..9d3a6dfde1 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -1434,6 +1434,41 @@ void \noindent{\bf Possible Error Codes:} {\tt VM\_BAD\_POWER\_STATE} \vspace{0.6cm} +\subsubsection{RPC name:~set\_VCPUs\_number\_live} + +{\bf Overview:} +Set this VM's VCPUs/at\_startup value, and set the same value on the VM, if +running. + + \noindent {\bf Signature:} +\begin{verbatim} void set_VCPUs_number_live (session_id s, VM ref self, int nvcpu)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt VM ref } & self & The VM \\ \hline + +{\tt int } & nvcpu & The number of VCPUs \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +void +} + + + +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} \subsubsection{RPC name:~get\_all} {\bf Overview:} diff --git a/tools/libxen/include/xen_vm.h b/tools/libxen/include/xen_vm.h index ddce6a8d1d..4b338088df 100644 --- a/tools/libxen/include/xen_vm.h +++ b/tools/libxen/include/xen_vm.h @@ -829,6 +829,14 @@ extern bool xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused); +/** + * Set this VM's VCPUs/at_startup value, and set the same value on the + * VM, if running + */ +extern bool +xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu); + + /** * Return a list of all the VMs known to the system. */ diff --git a/tools/libxen/src/xen_vm.c b/tools/libxen/src/xen_vm.c index f29d34f7eb..c0ac17c9d5 100644 --- a/tools/libxen/src/xen_vm.c +++ b/tools/libxen/src/xen_vm.c @@ -1593,6 +1593,22 @@ xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused) } +bool +xen_vm_set_vcpus_number_live(xen_session *session, xen_vm self, int64_t nvcpu) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = self }, + { .type = &abstract_type_int, + .u.int_val = nvcpu } + }; + + xen_call_(session, "VM.set_VCPUs_number_live", param_values, 2, NULL, NULL); + return session->ok; +} + + bool xen_vm_get_all(xen_session *session, struct xen_vm_set **result) {